/*
  This file is part of bnc.

  bnc is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  bnc is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with bnc.  If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>

typedef struct
{
  char pValue;
  unsigned int pWeight;
  void* pChildL;
  void* pChildR;
} node;

void nodeConstructor (node* aNode, char aValue);
unsigned char nodeCountChildren (node* aNode);
void nodeInjectChild (node* aNode, node* aChild);
node* nodeJoin (node* aNode, node* aChild);
node* nodeGetChildL (node* aNode);
node* nodeGetChildR (node* aNode);
char nodeIsLeaf (node* aNode);
unsigned char nodeGetValue (node* aNode);
unsigned int nodeGetWeight (node* aNode);
void nodeSetWeight (node* aNode, unsigned int aWeight);
char nodeSearch (node* aNode, char aValue, unsigned int* aPhase, char* aBufferO);
